import { createStore } from 'vuex';

interface Filter {
  type: string;
  value: string;
}

interface State {
  filters: Filter[];
}

const store = createStore<State>({
  state: {
    filters: []
  },
  mutations: {
    updateFilters(state, filters: Filter[]) {
      state.filters = filters;
    }
  },
  getters: {
    filters: state => state.filters
  }
});

export default store;
